package com.ruoyi.reservations.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 图书预约对象 reservations
 * 
 * @author anyunyi
 * @date 2025-05-28
 */
public class Reservations extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 预约ID */
    private Long id;

    /** 读者ID（关联users表） */
    @Excel(name = "读者ID", readConverterExp = "关=联users表")
    private Long userId;

    /** 图书ID（关联books表） */
    @Excel(name = "图书ID", readConverterExp = "关=联books表")
    private Long bookId;

    /** 预约时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date reserveTime;

    /** 预约有效期（默认7天） */
    @Excel(name = "预约有效期", readConverterExp = "默=认7天")
    private Date expireTime;

    /** 状态（1-待处理，2-已通知，3-已取消，4-已过期） */
    @Excel(name = "状态", readConverterExp = "1=-待处理，2-已通知，3-已取消，4-已过期")
    private Long status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }
    public void setReserveTime(Date reserveTime) 
    {
        this.reserveTime = reserveTime;
    }

    public Date getReserveTime() 
    {
        return reserveTime;
    }
    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("bookId", getBookId())
            .append("reserveTime", getReserveTime())
            .append("expireTime", getExpireTime())
            .append("status", getStatus())
            .toString();
    }
}
